cpu hotplug: Core functions are quiet on failure.
authorKeir Fraser <keir@xen.org>
Fri, 14 Jan 2011 09:52:02 +0000 (09:52 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 14 Jan 2011 09:52:02 +0000 (09:52 +0000)
This was already inconsistent, so make them consistently quiet and
leave it to callers to log an error. Add suitable error logging to the
arch-specific CPU bringup loops,

In particular this avoids printing error on EBUSY, in which case
caller may want a silent retry loop.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/arch/ia64/xen/xensetup.c
xen/arch/x86/setup.c
xen/common/cpu.c

index 9b3e725032f092b5ec4ce37ec0268517e690de2d..fe042e450a22e9f03c85202e9b726e423cf87dbc 100644 (file)
@@ -606,7 +606,11 @@ printk("num_online_cpus=%d, max_cpus=%d\n",num_online_cpus(),max_cpus);
         if ( num_online_cpus() >= max_cpus )
             break;
         if ( !cpu_online(i) )
-            cpu_up(i);
+        {
+            int ret = cpu_up(i);
+            if ( ret != 0 )
+                printk("Failed to bring up CPU %u (error %d)\n", i, ret);
+        }
     }
 
     local_irq_disable();
index d6f9e11f59ed84198477faae4f7f61871aa4b035..4bce2f47391ab1a4dd14fec2f9dbf57afaf48509 100644 (file)
@@ -1246,7 +1246,11 @@ void __init __start_xen(unsigned long mbi_p)
         numa_add_cpu(i);        
 
         if ( (num_online_cpus() < max_cpus) && !cpu_online(i) )
-            cpu_up(i);
+        {
+            int ret = cpu_up(i);
+            if ( ret != 0 )
+                printk("Failed to bring up CPU %u (error %d)\n", i, ret);
+        }
     }
 
     printk("Brought up %ld CPUs\n", (long)num_online_cpus());
index 2a248275a267f802cf926bf6c64e96b7dd00381c..5cdfd0fb1064a967fe8995364cdbfebb96a451b2 100644 (file)
@@ -108,7 +108,6 @@ int cpu_down(unsigned int cpu)
  fail:
     notifier_rc = notifier_call_chain(&cpu_chain, CPU_DOWN_FAILED, hcpu, &nb);
     BUG_ON(notifier_rc != NOTIFY_DONE);
-    printk("Failed to take down CPU %u (error %d)\n", cpu, err);
     cpu_hotplug_done();
     return err;
 }
@@ -150,7 +149,6 @@ int cpu_up(unsigned int cpu)
  fail:
     notifier_rc = notifier_call_chain(&cpu_chain, CPU_UP_CANCELED, hcpu, &nb);
     BUG_ON(notifier_rc != NOTIFY_DONE);
-    printk("Failed to bring up CPU %u (error %d)\n", cpu, err);
     cpu_hotplug_done();
     return err;
 }